package builder;

import factory.normal.MailSender;
import factory.normal.Sender;
import factory.normal.SmsSender;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: 80305082
 * @Date: 2021/3/22
 * @Description: 创建者模式
 */
public class Builder {
    private List<Sender> list = new ArrayList<>();

    public void produceMailSender(int count) {
        for (int i = 0; i < count; i++) {
            list.add(new MailSender());
        }
    }

    public void produceSmsSender(int count) {
        for (int i = 0; i < count; i++) {
            list.add(new SmsSender());
        }
    }
}
